<template>
  <router-view v-slot="{ Component }" v-if="route.meta.keepAlive">
    <keep-alive>
      <component :is="Component" />
    </keep-alive>
  </router-view>
  <router-view v-if="!route.meta.keepAlive"></router-view>
</template>

<script setup>
// import { ref } from "vue";
// import { watch } from "@vue/runtime-core";
import { useRoute } from "vue-router";
const route = useRoute();
</script>